f = open("ROV.moos")
lines = f.readlines()
conflines = []
for line in lines:
  if line != "\n" and line != "\t\n":
    conflines.append(line)

conflines = conflines[10:-1]

print(len(conflines))
cppcode = ""
code = ""
for line in conflines:
  pair = line.strip().split("=")
  l = pair[0].strip()
  r = pair[1].strip()
  #code = "double dbl" + l + ";\nif(!this->m_MissionReader.GetConfigurationParam(\"" + l + "\", dbl" + l +"))\n{\n\tMOOSTrace(\"CRov::OnStartUp(): Conf " + l + " missing\\n\");\n}\n\n"
  #cppcode += code
  cppcode += "double _dbl" + l + ";\n"

print cppcode            
